﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Miado.Validation
{
    internal static class Check
    {
        public static void For<TExceptionType>(bool assertion, string message) where TExceptionType : Exception
        {
            if ( assertion )
            {
                TExceptionType ex = Activator.CreateInstance(typeof(TExceptionType), message) as TExceptionType;
                throw ex;
            }
        }
    }
}
